package edu.gzy.rpsm_property.service;

import edu.gzy.rpsm_property.pojo.Amount;
import edu.gzy.rpsm_property.pojo.PageResult;
import edu.gzy.rpsm_property.pojo.vo.PayInfo;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;

public interface PayService {
    PageResult<PayInfo> pageOfPayInfo(Integer current, Integer size, LocalDate start, LocalDate end, String username, String idCard, Integer floorId, Integer buildingId);

    Integer insertUnpaid(Amount amount) throws DuplicateKeyException;

    @Transactional
    void handlePayment(Integer roomId, Integer paymentAmount, Integer payType);
}
